require 'rake'
require 'rspec/core/rake_task'

task :spec    => 'spec:all'
task :default => :spec

namespace :spec do
  
  targets = []
  targets << '.'

  task :all     => targets
  task :default => :all

  targets.each do |target|
    desc "Run rspec tests"
    RSpec::Core::RakeTask.new('.') do |t|
      ENV['TARGET_HOST'] = 'localhost'
      t.pattern = "spec/*_spec.rb"
    end
  end

end

